package com.hsgene.product.constants;

/**
 * @Description: //TODO
 * @ProjectName: hdas-geneshop
 * @Package: com.hsgene.product.constants
 * @Author: 江承良
 * @CreateDate: 2018/10/19 16:08
 * @Version: 1.0
 * Copyright: Copyright (c) 2018
 */
public enum CommentType {
    UNANSWERED(0,"未回复"),
    REPLIES(1,"已回复");

    private int code;

    private String desc;

    CommentType(int code,String desc){
        this.code = code;
        this.desc = desc;
    }

    public static String commentType(int code){
        for (CommentType commentType : values()) {
            if(code==commentType.code){
                return commentType.desc;
            }
        }
        return "";
    }
}
